'use strict';

angular.module("app").service('GoodsService', ['dbUtils', '$http', '$q', function (dbUtils, $http, $q) {
    return {
        getCategoryList: function(){
            return dbUtils.get("/goods/categoryList");
        },
        updateStatus:function(goodsIds,status){
            return dbUtils.post("/goods/udpateStatus",{goodsIds:goodsIds.join(","),status:status});
        },
        addGoods: function(data){
            return dbUtils.post("/goods/add",data);
        },
        getGoods: function(goodsId){
            return dbUtils.post("/goods/get",{goodsId:goodsId});
        },
        setGoods: function(data){
            return dbUtils.post("/goods/set",data);
        }
    }
}]);